class good {
public static void main (String[] args) {
int[]a = new int[8];
int i=0; int n=10;
while ( 괄호 A ) {
a[i++] = ( 괄호 B );
n /= 2;
}
for(i=7; i>=0; i--){
System.out.print(a[i]);
}
}
}
public class good {
public static void main(String[] args) {
int[][]a = new int[( 괄호A )][( 괄호B )];
for(int i = 0; i < 3; i++){
for(int j=0; j < 5; j++){
a[i][j] = j*3+(i+1);
System.out.print(a[i][j]+"");
}
System.out.println();
}
}
}
[출력 결과]
1 4 7 10 13
2 5 8 11 14
3 6 9 12 15
lol = [[1,2,3],[4,5],[6,7,8,9]]
print(lol[0])
print(lol[2][1])
for sub in lol:
for item in sub:
print(item, end = '')
print()
| 점수 | 성적 |
|---|---|
| 0 ~ 59 | 가 |
| 60 ~ 69 | 양 |
| 70 ~ 79 | 미 |
| 80 ~ 89 | 우 |
| 90 ~ 100 | 수 |
- WHERE 구문을 사용하지 않는다. - GROUP BY 를 사용한다. - 별칭(AS)을 사용한다. - 집계 함수를 사용한다. [학생]
| 학과 | 학생 |
|---|---|
| 전기 | 이순신 |
| 컴퓨터 | 안중근 |
| 컴퓨터 | 윤봉길 |
| 전자 | 이봉창 |
| 전자 | 강우규 |
| 학과 | 학과별튜플수 |
|---|---|
| 전기 | 1 |
| 컴퓨터 | 2 |
| 전자 | 2 |
#include
int main() {
char *p = "KOREA";
printf("%sn", p);
printf("%sn", p + 3);
printf("%cn", *p);
printf("%cn", *(p + 3));
printf("%cn", *p + 2);
return 0;
}
class Parent {
public int compute(int num){
if(num <=1) return num;
return compute(num-1) + compute(num-2);
}
}
class Child extends Parent {
public int compute(int num){
if(num<=1) return num;
return compute(num-1) + compute(num-3);
}
}
class Good {
public static void main (String[] args){
parent obj = new Child();
System.out.print(obj.compute(4));
}
}